package net.sxnic.workflow.invoker;

import net.sxnic.workflow.handler.HandlerExt;
import net.sxnic.workflow.handler.WfHandlerException;

public class WfHandlerInvoker<T> implements Invoker {

	private HandlerExt<T> handler;

	public WfHandlerInvoker(HandlerExt<T> handler) {
		super();
		this.handler = handler;
	}

	@Override
	public void edit() throws WfHandlerException {
		handler.editExecute();
	}

	@Override
	public void save() throws WfHandlerException {
		handler.saveExecute();
	}

	@Override
	public void view() throws WfHandlerException {
		handler.viewExecute();
	}

	@Override
	public void submit() throws WfHandlerException {		
		handler.submitExecute();
	}
}
